package com.dhcc.bpm.modules.system.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dhcc.bpm.modules.common.vo.SelectVo;
import com.dhcc.bpm.modules.system.entity.User;
import com.dhcc.bpm.modules.system.vo.UserVO;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @ClassName UserMapper
 * @Description Mapper 接口
 * @Author sjm
 * @Date 2020/2/21 0021 15:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 **/
public interface UserMapper extends BaseMapper<User> {

	/**
	 * @Description 自定义分页
	 * @Author sjm
	 * @Date 10:17 2020/2/22 0022
	 * @param page
	 * @param user
	 * @return java.util.List<com.dhcc.bpm.modules.system.entity.User>
	 **/
	List<User> selectUserPage(IPage page, User user);
	/**
	 * @Description 查询用户邮箱
	 * @Author daina
	 * @Date 11:21 2020/3/28
	 * @param user
	 * @return java.util.List<com.dhcc.bpm.modules.system.entity.User>
	 **/
	User selectByEmail(User user);
	/**
	 * @Description 查询用户手机号码
	 * @Author daina
	 * @Date 11:21 2020/3/28
	 * @param user
	 * @return java.util.List<com.dhcc.bpm.modules.system.entity.User>
	 **/
	User selectByPhone(User user);

	/**
	 * @Description 查询板块下面的用户
	 * @Author daina
	 * @Date 10:47 2020/3/5
	 * @param page
 * @param user
	 * @return java.util.List<UserVO>
	 **/
	List<UserVO> listTopicUser(IPage page, UserVO user);
	/**
	 * @Description 获取用户
	 * @Author sjm
	 * @Date 10:17 2020/2/22 0022
	 * @param tenantId
	 * @param account
	 * @param password
	 * @return com.dhcc.bpm.modules.system.entity.User
	 **/
	User getUser(String tenantId, String account, String password);

	/**
	 * @Description 根据用户账号获取信息
	 * @Author sjm
	 * @Date 10:17 2020/2/22 0022
	 * @param account
	 * @return com.dhcc.bpm.modules.system.entity.User
	 **/
    User selectUserByaccount(String account);

    /**
     * @Description TODO
     * @Author xiafayu
     * @Date 2020/3/20 14:26
     * @param  
     * @return java.util.List<com.dhcc.bpm.modules.common.vo.SelectVo>
     * @throws 
     **/
	List<SelectVo> selectUserName();
	/**
	 * @Description TODO
	 * @Author xiafayu
	 * @Date 2020/3/20 14:26
	 * @param ids
	 * @return java.util.List<com.dhcc.bpm.modules.common.vo.SelectVo>
	 * @throws
	 **/
	List<String> selectUserNameByIds(List<Long> ids);

	/**
	 * @Description 根据角色id查询用户
	 * @Author xiafayu
	 * @Date 2020/8/18 9:28
	 * @param roleId
	 * @return
	 * @throws
	 **/
	@InterceptorIgnore(tenantLine = "on")
	List<User> getByRoleId(@Param("roleId") String roleId);
	/**
	 * @Description 根据id查询用户
	 * @Author wjh
	 * @Date 2020年9月23日14:41:12
	 **/
	User  getById(Long id);

	boolean removeByIds(String[] ids);
}
